<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Express</title>
</head>
<body>
	<h1>Welcome to <%= title%></h1>
	<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	<script type="text/javascript">
		console.log('---准备访问接口---html')
	 	let apiGet = function () {
			$.ajax({
				type: "GET",
				url: "/test/apiget",
				data: { usename: '小明子' },
				dataType: "json",
				success: function (data) {
					console.log('返回参数', data)
				},
				error: function (err) {
					console.log('出错了', err)
				}
			})
		}
		apiGet()
	 </script>
</body>
</html>